package com.jn.exam.ucenter.service.impl;

import com.jn.exam.UUIDUtil;
import com.jn.exam.ucenter.entity.Admin;
import com.jn.exam.ucenter.mapper.AdminMapper;
import com.jn.exam.ucenter.service.AdminService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author 江南大学1033190417
 * @since 2022-01-20
 */
@Service
public class AdminServiceImpl extends ServiceImpl<AdminMapper, Admin> implements AdminService {

    //添加人脸库组
    @Override
    public boolean addFaceGroup() {
        String UUID = UUIDUtil.getUUID();
        return baseMapper.addFaceGroup(UUID);
    }

    //随机获取一个人脸库id
    @Override
    public String getOneFaceGroup() {
        return baseMapper.getOneFaceGroup();
    }

    @Override
    public List<String> getFaceGroup() {
        return baseMapper.getFaceGroup();
    }
}
